package cn.ad.enumration;

public enum StrategyStatus {

	ADSTATUS_DELETED(-1,"删除"),
    ADSTATUS_RESET(0,"草稿"),
    ADSTATUS_NORMAL(1,"待投放"), //通过时间判断
    ADSTATUS_RUNNING(2,"投放中"),   //通过时间判断
    ADSTATUS_FINISH(3,"已完成"),    //通过时间判断
    ADSTATUS_SUSPEND(4,"已暂停");  //

    private int value;
    private String description;
    private static java.util.HashMap<Integer, String> mappings;
    
    private synchronized static java.util.HashMap<Integer, String> getMappings() {
        if (mappings == null) {
        	mappings = new java.util.HashMap<Integer, String>();
        	for (StrategyStatus status : StrategyStatus.values()) {
        		mappings.put(status.value, status.description);
        	}
        }
        return mappings;
    }
	private StrategyStatus(int value, String description) {
		this.value = value;
		this.description = description;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public static String forValue(int value) {
	   return getMappings().get(value);
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return this.value+"";
	}
    
	
	
    
}
